from datetime import datetime , timedelta
now = datetime.now()


last_modal_rate_hour_str = "2025-11-19 09"
last_modal_rate_hour_obj = datetime.strptime(last_modal_rate_hour_str, "%Y-%m-%d %H")
query_date = now + timedelta(hours=-1)
delta = query_date - last_modal_rate_hour_obj

hour = int(delta.total_seconds() / 3600)
print(f"-----hour: {hour}")
for i in range(0, hour):
    new_hour = last_modal_rate_hour_obj + timedelta(hours=i + 1)
    print(f"-----new_hour: {new_hour}")







last_day_modal_rate_hour_str = "2025-11-19 09"
last_day_modal_rate_hour_obj = datetime.strptime(last_day_modal_rate_hour_str, "%Y-%m-%d %H")
query_date = now + timedelta(days=-1)
delta = query_date - last_day_modal_rate_hour_obj

day = int(delta.total_seconds() / (3600 * 24))
print(f"-----day: {day}")
for i in range(0, day):
    new_day = last_day_modal_rate_hour_obj + timedelta(days=i + 1)
    print(f"-----new_day: {new_day}")


